<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>IP端口搜索</title>
        <!-- Bootstrap 核心 CSS 文件 -->
        <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
        <style>
            /*web background*/
            .container{
                display:table;
                height:100%;
            }

            .row{
                display: table-cell;
                vertical-align: middle;
            }
            /* centered columns styles */
            .row-centered {
                text-align:center;

            }
            .col-centered {
                display:inline-block;
                float:none;
                text-align:left;
                margin-right:-4px;
            }
        </style>
    </head>

    <body>

        <div class="container">
            <div class="row row-centered">
                <div class="well col-md-6 col-centered">
                    <h2>使用shodan进行ip端口搜索</h2>
                    <form action="/ipandport/" method="post" role="form">
                        {% csrf_token %}
                        <div class="input-group input-group-md">
                            <span class="input-group-addon" id="sizing-addon1"><i class="glyphicon glyphicon-search" aria-hidden="true"></i></span>
                            <input type="text" class="form-control" id="userid" name="url" placeholder="请输入要搜索的url"/>
                        </div>

                        <br/>
                        <button type="submit" class="btn btn-success btn-block">搜索</button>
                        </form>
                    <button onclick="window.location.href = '/index/'" class="btn btn-success btn-block">回到主页</button>

                    <div class="panel panel-default">
                        <div class="panel-body">
                            您搜索的url地址为：{{ url }}
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">搜索结果</h3>
                        </div>
                        <div class="panel-body">
                            ip地址：<br>
                            {{ ip }}<br>
                            端口号<br>
                            {{ port }}<br>

                        </div>
                    </div>
                        </div>
                    </div>


                </div>


        <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
        <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>

        <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
        <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    </body>
</html>